declare global {
    interface Array<T> {
        clear(): Array<T>;
        remove(t: T): boolean;
    }
}

Array.prototype.clear = function () {
    this.splice(0, this.length);
    return this;
}

Array.prototype.remove = function <T>(t: T) {
    const idx = this.indexOf(t);
    if (idx === -1) {
        return false;
    }
    this.splice(idx, 1);
    return true;
}

export { }